﻿@{
    ViewBag.Title = "问卷问题";
}
@section header{

}
<form id="form1">
    <div class="form-layout">
        <input type="hidden" name="ID" value="" />
        <input type="hidden" id="OrderBy" name="OrderBy" value="" />
        <input type="hidden" id="AddTime" name="AddTime" value="" />
        <table class="form">

            <tr>
                <th class="formTitle">关联调查</th>
                <td class="formValue">
                    <input id="SurveyUid" name="SurveyUid" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">标题</th>
                <td class="formValue">
                    <input id="Content" name="Content" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">问题类型</th>
                <td class="formValue">
                    <input id="TypeId" name="TypeId" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">排序</th>
                <td class="formValue">
                    <input id="SortIndex" name="SortIndex" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">其它</th>
                <td class="formValue">
                    <input id="HasOther" name="HasOther" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">必填</th>
                <td class="formValue">
                    <input id="Required" name="Required" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">页码</th>
                <td class="formValue">
                    <input id="PageNum" name="PageNum" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">索引</th>
                <td class="formValue">
                    <input id="QIndex" name="QIndex" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">绝对编号</th>
                <td class="formValue">
                    <input id="AbsoluteId" name="AbsoluteId" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">末尾绝对编号</th>
                <td class="formValue">
                    <input id="LastAbsoluteId" name="LastAbsoluteId" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">逻辑隐藏</th>
                <td class="formValue">
                    <input id="LogicHide" name="LogicHide" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">互斥选项</th>
                <td class="formValue">
                    <input id="ExclusiveOptions" name="ExclusiveOptions" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">标题引用</th>
                <td class="formValue">
                    <input id="TitleQuote" name="TitleQuote" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">最大值</th>
                <td class="formValue">
                    <input id="MaxValue" name="MaxValue" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">最小值</th>
                <td class="formValue">
                    <input id="MinValue" name="MinValue" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">JSON内容</th>
                <td class="formValue">
                    <input id="JSONContent" name="JSONContent" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">跳转关系</th>
                <td class="formValue">
                    <input id="RedirectRelation" name="RedirectRelation" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">选择项引用</th>
                <td class="formValue">
                    <input id="ChoiceQuote" name="ChoiceQuote" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">有效开始时间</th>
                <td class="formValue">
                    <input id="EnableDate" name="EnableDate" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">有效截止时间</th>
                <td class="formValue">
                    <input id="DisableDate" name="DisableDate" type="text" class="form-control " autocomplete="off" />
                </td>
            </tr>



        </table>
    </div>
</form>

@section scripts{
    <script>
        var baseUrl = "/Survey/SurQuestion/";
        var keyValue = $.request("keyValue");
        $(function () {
            initControl();
            if (!!keyValue) {
                $.ajax({
                    url: baseUrl + "GetFormJson",
                    data: { keyValue: keyValue },
                    dataType: "json",
                    async: false,
                    success: function (data) {
                        $("#form1").formSerialize(data);
                    }
                });
            }
        });
        function initControl() {

        }
        function submitForm() {
            if (!$('#form1').formValid()) {
                return false;
            }
            $.submitForm({
                url: baseUrl + "SubmitForm?keyValue=" + keyValue,
                param: $("#form1").formSerialize(),
                success: function () {
                    $.currentWindow().$("#gridList").resetSelection();
                    $.currentWindow().$("#gridList").trigger("reloadGrid");
                }
            })
        }
    </script>
}